<template>
  <div>
    <h1 v-upper.xiushifu="msg"></h1>
    <Header></Header>
    <!-- 路由组件出口的地方 -->
    <router-view></router-view>
    <!-- Footer在Home、Search显示,在登陆、注册隐藏 -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>
<script>
//引入
import Header from './components/Header'
import Footer from './components/Footer'
  export default {
    name:'',
    data() {
      return {
        msg: ''
      }
    },
    components:{
      Header,
      Footer
    },
    mounted(){
      // console.log("我是根组件")
      //通知Vuex发请求,获取数据,存储于仓库当中,派发action,获取商品分类的三级列表的数据
      this.$store.dispatch("categoryList");
    }
  }
</script>

<style lang="scss" scoped>

</style>
